package com.catchman.utils;

import java.io.IOException;

/**
 * 此工具类 为操作系统一些特定操作工具类
 * @author catchaman
 */
public class RuntimeUtil {
    /**
     * 执行cmd命令
     *
     * @param cmd
     * @return 是否正确执行cmd命令 true/false
     * @throws IOException
     * @throws InterruptedException
     */
    public static Boolean excuteCmd(String cmd) throws IOException, InterruptedException {
        Process process = Runtime.getRuntime().exec(cmd);
        int rCode = process.waitFor();
        return rCode == 0;
    }
}
